#SET(FFMPEG_BASE /home/ole/workspace/1_project/demo/android/ffmpeg/out)
SET(FFMPEG_BASE /home/ole/workspace/1_project/demo/cpp/ffmepg/out)

set(CMAKE_VERBOSE_MAKEFILE on)

include_directories (
        ${FFMPEG_BASE}/include
        /usr/include/SDL
        )

link_directories (
        ${FFMPEG_BASE}/lib
        /usr/lib/x86_64-linux-gnu
        )

add_compile_options(-std=c++11)
add_compile_options(-Wno-deprecated-declarations)

add_definitions(
        -D_REENTRANT
        -D_GNU_SOURCE=1
        )

add_custom_target(
        run
        COMMAND export LD_LIBRARY_PATH=${FFMPEG_BASE}/lib && ../../bin/ffdemo ../../demo.mp4
        COMMENT "Run executable ffdemo"
        )

aux_source_directory(. SRC_LIST)
add_executable(ffdemo ${SRC_LIST})

target_link_libraries(
        ffdemo
        avcodec
        avformat
        avdevice
        avfilter
        avutil
        swscale
        m
        SDL
        )


